package com.ruoyi.cms.service.impl;

import com.ruoyi.cms.domain.CmsSiteBanne;
import com.ruoyi.cms.domain.CmsSiteCase;
import com.ruoyi.cms.domain.vo.CmsSiteCaseVo;
import com.ruoyi.cms.mapper.CmsSiteBanneMapper;
import com.ruoyi.cms.mapper.CmsSiteCaseMapper;
import com.ruoyi.cms.service.ICmsSiteBanneService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.stream.Collectors;

/**
 * 案例模块轮播内容信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-08-31
 */
@Service
public class CmsSiteBanneServiceImpl implements ICmsSiteBanneService
{
    @Autowired(required = false)
    private CmsSiteBanneMapper cmsSiteBanneMapper;

    /**
     * 查询案例模块轮播内容信息
     * 
     * @param id 案例模块轮播内容信息主键
     * @return 案例模块轮播内容信息
     */
    @Override
    public CmsSiteBanne selectCmsSiteBanneById(Long id)
    {
        return cmsSiteBanneMapper.selectCmsSiteBanneById(id);
    }

    /**
     * 查询案例模块轮播内容信息列表
     * 
     * @param cmsSiteBanne 案例模块轮播内容信息
     * @return 案例模块轮播内容信息
     */
    @Override
    public List<CmsSiteBanne> selectCmsSiteBanneList(CmsSiteBanne cmsSiteBanne)
    {
        return cmsSiteBanneMapper.selectCmsSiteBanneList(cmsSiteBanne);
    }

    /**
     * 新增案例模块轮播内容信息
     * 
     * @param cmsSiteBanne 案例模块轮播内容信息
     * @return 结果
     */
    @Override
    public int insertCmsSiteBanne(CmsSiteBanne cmsSiteBanne)
    {
        return cmsSiteBanneMapper.insertCmsSiteBanne(cmsSiteBanne);
    }

    /**
     * 修改案例模块轮播内容信息
     * 
     * @param cmsSiteBanne 案例模块轮播内容信息
     * @return 结果
     */
    @Override
    public int updateCmsSiteBanne(CmsSiteBanne cmsSiteBanne)
    {
        return cmsSiteBanneMapper.updateCmsSiteBanne(cmsSiteBanne);
    }

    /**
     * 批量删除案例模块轮播内容信息
     * 
     * @param ids 需要删除的案例模块轮播内容信息主键
     * @return 结果
     */
    @Override
    public int deleteCmsSiteBanneByIds(Long[] ids)
    {
        return cmsSiteBanneMapper.deleteCmsSiteBanneByIds(ids);
    }

    /**
     * 删除案例模块轮播内容信息信息
     * 
     * @param id 案例模块轮播内容信息主键
     * @return 结果
     */
    @Override
    public int deleteCmsSiteBanneById(Long id)
    {
        return cmsSiteBanneMapper.deleteCmsSiteBanneById(id);
    }

    //同步分页
    /*@Override
    public List<CmsSiteBanne> selectCmsSiteBanneListPage(String caseId, int page, int count) {
        return cmsSiteBanneMapper.selectCmsSiteBanneListPage(caseId, page, count);

    }*/


}
